import multiprocessing

def worker(d, key, manager_lock):
    with manager_lock:
        d[key] = 1

class ManagerDict:
    def __init__(self):
        pass

    def deal(self):
        manager = multiprocessing.Manager()
        d = manager.dict()
        manager_lock = manager.Lock()
        processes = [multiprocessing.Process(target=worker,args=(d, 'a', manager_lock)) for i in range(10)]
        for process in processes:
            process.start()
        for process in processes:
            process.join()